package exceptionsthrown;

import exceptionsthrown.ExceptionsThrownMatch;
import org.eclipse.viatra2.emf.incquery.runtime.api.IMatchProcessor;

/**
 * A match processor tailored for the ExceptionsThrown pattern.
 * 
 * Clients should derive an (anonymous) class that implements the abstract process().
 * 
 */
public abstract class ExceptionsThrownProcessor implements IMatchProcessor<ExceptionsThrownMatch> {
  /**
   * Defines the action that is to be executed on each match.
   * @param pEx the value of pattern parameter ex in the currently processed match 
   * 
   */
  public abstract void process(final sysmodel.Exception ex);
  
  @Override
  public void process(final ExceptionsThrownMatch match) {
    process(match.getEx());  				
    
  }
}
